package com.hjn.annotation.autowired.pojo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author huaijn
 * @version 1.0.0
 * @Date 2020/8/30 21:46
 * @Description 学生类
 */
@Component("student")
public class Student {
    private String name;
    private String sex;
    private int age;

    @Autowired
    private School school;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", school=" + school +
                '}';
    }
}
